package com.ruoyi.test.dao;

import com.ruoyi.test.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserDao {
    @Select("select * from chat_user where nickname=#{nickname}")
    User getUserByNickname(String nickname);

    @Insert("insert into chat_user(nickname,password) values(#{nickname},#{password})")
    void addUser(User user);
}

